import { defineComponent } from 'vue';
import styles from './index.module.scss'; // ✅ 引入模块对象

const ICP = defineComponent({
  name: 'ICP',
  props: {
    icpNumber: {
      type: String,
      required: true
    },
    href: {
      type: String,
      default: 'https://beian.miit.gov.cn/'
    },
    className: {
      type: String,
      default: ''
    }
  },
  render() {
    return (
      <a
        href={this.href}
        className={`${styles.ICP} ${this.className}`} // ✅ 正确绑定模块化类名 + 用户传入类名
        target="_blank"
        rel="noopener noreferrer"
      >
        {this.icpNumber}
      </a>
    );
  }
});

export default ICP;
